<template>
  <div class="resume">
    <div class="resume-header clearfix">
      <div class="fl resume-header-left">{{nickName}}的简历</div>
      <div
        class="fr resume-header-right"
        @click="print"
      >打印简历</div>
    </div>
    <div ref="print">
      <div class="rebox basic">
        <h3>基本信息</h3>
        <div class="basic-content">
          <div class="img-box">
            <img
              @click="zoom(vitaeinfo)"
              class="user-img"
              :src="vitaeinfo.accessoryid"
              alt=""
            >
          </div>
          <div class="basic-content-info">
            <h2>{{vitaeinfo.name}}</h2>
            <ul class="basic-infor-box">
              <li>
                <div>性别: </div>
                <div v-if="vitaeinfo.sex === '1'">男</div>
                <div v-else-if="vitaeinfo.sex === '2'">女</div>
                <div v-else>未知</div>
              </li>
              <li>
                <div>年龄: </div>
                <div>{{vitaeinfo.age}}岁</div>
              </li>
              <li>
                <div>婚姻: </div>
                <div v-show="vitaeinfo.marriage==='1'">未婚</div>
                <div v-show="vitaeinfo.marriage==='2'">已婚</div>
                <div v-show="vitaeinfo.marriage==='3'">离异</div>
                <div v-show="vitaeinfo.marriage==='5' || !vitaeinfo.marriage">保密</div>
              </li>
              <li>
                <div>学历: </div>
                <div>{{vitaeinfo.qualificationname || '未填'}}</div>
              </li>
              <li>
                <div>工作经验: </div>
                <div v-if="!vitaeinfo.workyear">未填</div>
                <div v-else>{{vitaeinfo.workyear}}年</div>
              </li>
              <li>
                <div>状态: </div>
                <div>{{vitaeinfo.jobstatusname || '未填'}}</div>
              </li>
              <li>
                <div>手机号码: </div>
                <div>{{vitaeinfo.telnum || '未填'}}</div>
              </li>
              <li>
                <div>身份证: </div>
                <div v>{{vitaeinfo.idcardnum || '未填'}}</div>
              </li>
              <li class="especially">
                <div>居住地: </div>
                <div>{{vitaeinfo.regionname || '未填'}}</div>
              </li>
              <li>
                <div>邮箱: </div>
                <div v>{{vitaeinfo.email || '未填'}}</div>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <div
        class="rebox"
        v-if="vitaeinfo.evaluation"
      >
        <h3>自我评价</h3>
        <pre v-html="vitaeinfo.evaluation"></pre>
      </div>
      <div
        class="rebox will"
        v-for="item in intensioninfo"
        :key="item.intensionid"
      >
        <h3>求职意向</h3>
        <ul class="basic-infor-box">
          <li>
            <div>职位名称 : </div>
            <div>{{item.position || '未填'}}</div>
          </li>
          <li>
            <div>工作地点 : </div>
            <div>{{item.regionname || '未填'}}</div>
          </li>
          <li>
            <div>职能 : </div>
            <div>{{item.tradename || '未填'}}</div>
          </li>
          <li>
            <div>人才类型 : </div>
            <div>{{item.talenttypename || '未填'}}</div>
          </li>
          <li>
            <div>期望薪资 : </div>
            <div>{{item.miniwage/1000 || '0'}}k-{{item.maxwage/1000 || '未填'}}k</div>
          </li>
          <li>
            <div>行业 : </div>
            <div>{{item.professiontypename1 || '未填'}}</div>
          </li>
          <li>
            <div>到岗时间 : </div>
            <div v-if="!item.arrivetype">未填</div>
            <div v-else-if="item.arrivetype ==='0'">随时</div>
            <div v-else-if="item.arrivetype ==='1'">1周内</div>
            <div v-else-if="item.arrivetype ==='2'">1个月内</div>
            <div v-else-if="item.arrivetype ==='3'">3个月内</div>
            <div v-else-if="item.arrivetype ==='4'">待定</div>
          </li>
        </ul>
      </div>
      <div
        class="rebox worklife"
        v-if="worklist.length>0"
      >
        <h3>工作经历</h3>
        <ul
          v-for="item in worklist"
          :key="item.experid"
        >
          <li>
            <div>
              <span>{{(item.begintime).replace('-', '/')}}-{{(item.endtime).replace('-', '/')}}</span>
              <span>({{Math.floor(item.worktime/12)}}年{{item.worktime%12}}个月)</span>
            </div>
            <div class="fw600 ml40">
              <span v-show="item.position">{{item.position}}</span>
              <span v-show="item.department">| {{item.department}}</span>
            </div>
          </li>
          <li
            class="fw600"
            v-html="item.company"
          ></li>
          <li>
            <span v-show="item.tradename">{{item.tradename}} |</span>
            <span v-show="item.size">{{item.size | filterSize}} |</span>
            <span v-show="item.property">{{item.property | filterType}}</span>
          </li>
          <li>
            <div>工作描述 : </div>
            <pre v-html="item.description"></pre>
          </li>
        </ul>
      </div>
      <div
        class="rebox project worklife"
        v-if="projectlist.length>0"
      >
        <h3>项目经验</h3>
        <ul
          v-for="item in projectlist"
          :key="item.projectid"
        >
          <li>
            <div>
              <span>{{(item.begintime).replace('-', '/')}}-{{(item.endtime).replace('-', '/')}}</span>
            </div>
            <div
              class="fw600 ml100"
              v-html="item.projectname"
            ></div>
          </li>
          <li>
            <div>项目描述 : </div>
            <pre v-html="item.description"></pre>
          </li>
          <li>
            <div>责任描述 : </div>
            <pre v-html="item.dutydesc"></pre>
          </li>
        </ul>
      </div>
      <div
        class="rebox education worklife"
        v-if="educationlist.length>0"
      >
        <h3>教育经历</h3>
        <ul
          v-for="item in educationlist"
          :key="item.educationid"
        >
          <li>
            <div>
              <span>{{(item.begintime).replace('-', '/')}}-{{(item.endtime).replace('-', '/')}}</span>
            </div>
            <div
              class="fw600 ml100"
              v-html="item.school"
            ></div>
          </li>
          <li class="fw600">
            <div>{{item.qualification | filterEdu}}</div>
            <div>{{item.specialty}}</div>
          </li>
          <li>
            <div>专业描述 : </div>
            <pre v-html="item.description"></pre>
          </li>
        </ul>
      </div>
      <div
        class="rebox education worklife"
        v-if="trainlist.length>0"
      >
        <h3>培训经历</h3>
        <ul
          v-for="item in trainlist"
          :key="item.trainid"
        >
          <li>
            <div>{{(item.begintime).replace('-', '/')}}-{{(item.endtime).replace('-', '/')}}</div>
            <div
              class="fw600 ml100"
              v-html="item.trainschool"
            ></div>
          </li>
          <li
            class="fw600"
            v-html="item.trainpost"
          ></li>
          <li>
            <div>培训证书 : </div>
            <pre v-html="item.trainpost"></pre>
          </li>
        </ul>
      </div>
      <div
        class="rebox"
        v-if="vitaeinfo.hobby"
      >
        <h3>个人爱好</h3>
        <pre v-html="vitaeinfo.hobby"></pre>
      </div>
      <div
        class="rebox"
        v-if="vitaeinfo.expectation"
      >
        <h3>发展期望</h3>
        <pre v-html="vitaeinfo.expectation"></pre>
      </div>
    </div>
    <zoomer :options="options" :imgVisible.sync="visible"></zoomer>
  </div>
</template>

<script src="./index.js"></script>

<style scoped src="./index.css"></style>
